import request from '@/utils/request'

// 查询企业职工基本信息列表
export function listEmployee(data) {
  return request({
    url: `/app/employee/list?currentPage=${data.currentPage}&pageSize=${data.pageSize}`,
    method: 'post',
    data 
  })
}

// 查询企业职工基本信息详细
export function getEmployee(id) {
  return request({
    url: '/app/employee/' + id,
    method: 'get'
  })
}

// 新增企业职工基本信息
export function addEmployee(data) {
  return request({ 
    url: '/app/employee',
    method: 'post',
    data: data
  })
}
// 新增工种
export function addCertificateName(data) {
  return request({ 
    url: '/app/certificateName',
    method: 'post',
    data: data
  })
}

// 修改企业职工基本信息
export function updateEmployee(data) {
  return request({
    url: '/app/employee',
    method: 'put',
    data: data
  })
}

// 删除职工特种作业证件
export function delinfo(id) {
  return request({
    url: `/app/info/${id}`,
    method: 'delete'
  })
}



// 删除企业职工基本信息
export function delEmployee(id) {
  return request({
    url: '/app/employee/' + id,
    method: 'delete'
  })
}


export function userList(query) {
  return request({
    url: 'app/employee/getList',
    method: 'get',
    params: query 
  })
}

export function certificateNameList(query) {
  return request({
    url: 'app/certificateName/list',
    method: 'get',
    params: query 
  })
}

export function deptList(query) {
  return request({
    url: 'system/dept/list',
    method: 'get',
    params: query  
  })
}

export function postList(query) {
  return request({
    url: 'system/post/list',
    method: 'get',
    params: query 
  })
}
// 人员类型下拉
export function getPeopleTypeList(data) {
  return request({
    url: 'app/employee/getPeopleTypeList',
    method: 'get',
    data
  })
}

// 员工培训信息
export function profile(data) {
  return request({
    url: 'app/personal/profile',
    method: 'post',
    data: data 
  })
}
// 员工详细记录
export function getTest(params) {
  return request({
    url: '/plan/getTest',
    method: 'get',
    params: params 
  })
}

// 员工详细记录
export function examMember(data) {
  return request({
    url: 'app/exam/member/listByMemberId',
    method: 'post',
    data: data 
  })
}
// 查询员工培训信息
export function listTrainuser(query) {
  return request({
    url: '/app/trainuser/list',
    method: 'get',
    params: query
  })
}



  